﻿@model WmWebSystem.Models.News

@{
    ViewBag.Title = "创建新闻";
    Layout = "~/Views/Shared/_Layout_manage.cshtml";
}

<div class="contentcontainer">
    <div class="headings">
        <h2>添加新闻</h2>
    </div>
    <div class="contentbox">
        @using (Html.BeginForm())
        {
            @Html.ValidationSummary(true)

            <table>
                <tr>
                    <th width="200px">标题（*）</th>
                    <td>
                      @Html.TextBoxFor(model => model.Title, new { @class = "box" })
                    </td>
                </tr>
                <tr>
                    <th>新闻类型</th>
                    <td>
                        @{
                            List<SelectListItem> selectList = new List<SelectListItem>();
                            selectList.Add(new SelectListItem { Text = "--请新闻类型--", Value = "0", Selected = true });
                            foreach (object e in Enum.GetValues(typeof(WmWebSystem.Models.Enum.NewsType)))
                            {
                                selectList.Add(new SelectListItem { Text = Enum.GetName(typeof(WmWebSystem.Models.Enum.NewsType), e), Value = ((int)e).ToString() });
                            }
                               @Html.DropDownList("NewsType1", selectList);
                         } 
                    </td>
                </tr>
                <tr>
                   <th>新闻内容(*)</th>
                   <td>
                       @Html.TextAreaFor(model=>model.Content)
                   </td>
                </tr>
                <tr>
                   <th></th>
                   <td>
                    <input type="button" title="取消" value="<< 返回" id="GoBackList" onclick="history.go(-1)" />
                    <input class="btn" title="添加新闻" value="确认添加 >> " type="submit" />
                   </td>
                </tr>
            </table>
        }  
        <div style="clear: both;"></div>
    </div>
</div>

<script type="text/javascript">
    CKEDITOR.replace('Content');
</script>

